import config from "@/config"
import http from "@/utils/request"

export default {
	getGoodsTypeLists: {
        lists:{
            url: `${config.API_URL}/adminapi/shop.shopGoodsSizeCate/lists`,
            name: "获取商品类别列表",
            get: async function(){
                return await http.get(this.url);
            }
        },
        add: {
			url: `${config.API_URL}/adminapi/shop.shopGoodsSizeCate/add`,
			name: "添加商品类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        edit: {
			url: `${config.API_URL}/adminapi/shop.shopGoodsSizeCate/edit`,
			name: "编辑商品类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        delete: {
			url: `${config.API_URL}/adminapi/shop.shopGoodsSizeCate/delete`,
			name: "删除商品类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        type:{
            url: `${config.API_URL}/adminapi/shop.shopGoodsSizeCate/detail`,
            name: "获取商品类别详情",
            get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
	},
    getGoodsPosition: {
        lists:{
            url: `${config.API_URL}/adminapi/shop.shopGoodsLocation/lists`,
            name: "获取商品部位列表",
            get: async function(){
                return await http.get(this.url);
            }
        },
        add: {
			url: `${config.API_URL}/adminapi/shop.shopGoodsLocation/add`,
			name: "添加商品部位",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        edit: {
			url: `${config.API_URL}/adminapi/shop.shopGoodsLocation/edit`,
			name: "编辑商品部位",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        delete: {
			url: `${config.API_URL}/adminapi/shop.shopGoodsLocation/delete`,
			name: "删除商品部位",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    getGoodsStyle: {
        lists:{
            url: `${config.API_URL}/adminapi/shop.shopGoodsStyle/lists`,
            name: "获取商品款式列表",
            get: async function(){
                return await http.get(this.url);
            }
        },
        add: {
			url: `${config.API_URL}/adminapi/shop.shopGoodsStyle/add`,
			name: "添加商品款式",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        edit: {
			url: `${config.API_URL}/adminapi/shop.shopGoodsStyle/edit`,
			name: "编辑商品款式",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        delete: {
			url: `${config.API_URL}/adminapi/shop.shopGoodsStyle/delete`,
			name: "删除商品款式",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    getGoods: {
        lists:{
            url: `${config.API_URL}/adminapi/shop.shopGoods/lists`,
            name: "获取商品列表",
            // get: async function(){
            //     return await http.get(this.url);
            // }
            get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
        add: {
			url: `${config.API_URL}/adminapi/shop.shopGoods/add`,
			name: "添加商品",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        edit: {
			url: `${config.API_URL}/adminapi/shop.shopGoods/edit`,
			name: "编辑商品",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        delete: {
			url: `${config.API_URL}/adminapi/shop.shopGoods/delete`,
			name: "删除商品",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        status: {
			url: `${config.API_URL}/adminapi/shop.shopGoods/change_status`,
			name: "修改状态商品",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/shop.shopGoods/detail`,
			name: "获取商品详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	},
    getAllGoodsType:{
        url: `${config.API_URL}/adminapi/shop.shopGoodsSizeCate/all`,
        name: "获取全部商品类别列表",
        get: async function(){
            return await http.get(this.url);
        }
    },
    getAllGoodsStyle:{
        url: `${config.API_URL}/adminapi/shop.shopGoodsStyle/all`,
        name: "获取全部商品款式列表",
        get: async function(){
            return await http.get(this.url);
        }
    },
    getAllGoodsPosition:{
        url: `${config.API_URL}/adminapi/shop.shopGoodsLocation/all`,
        name: "获取全部商品部位列表",
        get: async function(){
            return await http.get(this.url);
        }
    },
    getGoodsFileDetail:{
        url: `${config.API_URL}/adminapi/shop.shopGoods/getGoodsFileDetail`,
        name: "获取商品资料",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    addZiliao: {
        url: `${config.API_URL}/adminapi/shop.shopGoods/addZiliao`,
        name: "画花上传",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    addPaperSample: {
        url: `${config.API_URL}/adminapi/shop.shopGoods/addPaperSample`,
        name: "吓数上传",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    delZiliao: {
        url: `${config.API_URL}/adminapi/shop.shopGoods/delZiliao`,
        name: "删除资料",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    saveZiliao: {
        url: `${config.API_URL}/adminapi/shop.shopGoods/saveZiliao`,
        name: "上传资料",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
}
